﻿@model BMS.ViewModels.SubContractorModelList

@{
    ViewBag.Title = "Sub Contractor Maintenance";
}

@section featured {
    <section class="featured">
        <div class="content-wrapper" align="center">
            <hgroup class="title">
                <h1>@ViewBag.Message</h1>
            </hgroup>
        </div>
    </section>
}

<section id="loginForm">
    <h2>New Sub Contractor Registration</h2>
    <br />
    @using (Html.BeginForm("CreateSubContractor", "Maintenance"))
    {
        @Html.ValidationSummary(true)
        <fieldset>
            @Html.LabelFor(m => m.subContractor.SubContractorName)
            @Html.TextBoxFor(m => m.subContractor.SubContractorName)
            @Html.ValidationMessageFor(m => m.subContractor.SubContractorName)
            <input type="submit" value="Create" />
        </fieldset>
    }
    @using (Html.BeginForm("BackToMainMeun", "Home"))
    {
        <br />
        <input type="submit" value="Back To Main Menu" />
    }
</section>

<section class="social" id="socialLoginForm">
    <h2>Existing Sub Contractors</h2>
    @if (Model.subContractorList.Count > 0)
    {
        <br align="center" />
        <table class="sample">
            <thead>
                <tr>
                    <th width="100">Sub Contractor ID</th>
                    <th width="400">Sub Contractor Name</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model.subContractorList)
                {
                    <tr>
                        <td align="center">@item.SubContractorID</td>
                        <td align="center">@item.SubContractorName</td>
                    </tr>
                }
            </tbody>
        </table>
    }
</section>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}